#include "Food.h"

namespace Hunger
{
	Food::Food() : nourishment(100), isConsumed(false)
	{
	}

	Food::~Food()
	{
	}

	int Food::Consume()
	{
		int sustinence = nourishment;
		nourishment = 0;
		isConsumed = true;

		return sustinence;
	}

	bool Food::SetNourishment(int value)
	{
		if(!isConsumed)
		{
			nourishment = value;
			return true;
		}
		else
		{
			//food has already been consumed, cannot affect nourishment
			return false;
		}
	}
	const int Food::GetNourishment()
	{
		return nourishment;
	}
}
